Skip to content

Conversation

@cjee21
Copy link
Contributor

@cjee21 cjee21 commented Oct 1, 2025

Also set CMake version range to prevent deprecation warnings.

@JeromeMartinez
Copy link
Member

Also set CMake version range to prevent deprecation warnings.

Shouldn't max version be 3.30? I read from doc that 3.31 introduces the deprecation warnings for <3.10.

@cjee21
Copy link
Contributor Author

cjee21 commented Oct 1, 2025

Shouldn't max version be 3.30? I read from doc that 3.31 introduces the deprecation warnings for <3.10.

I don't know much about CMake. I saw the warning so I just put the current version shipped with MSVC there and the warning is gone.

@JeromeMartinez
Copy link
Member

https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html
"Changed in version 3.31: Compatibility with versions of CMake older than 3.10 is deprecated.

Please change 3.31 to 3.30

@JeromeMartinez
Copy link
Member

Fun fact: back to 3.5 in CMake 4.0, looks like that deprecating up to 3.10 was not a good idea, but impossible to say to accept v4.0+ in addition to 3.30-, so 3.30...

@cjee21
Copy link
Contributor Author

cjee21 commented Oct 1, 2025

It appears that after changing 3.31 to 3.30, another warning has returned:

CMake Warning (dev) at CMakeLists.txt:456 (install):
  Policy CMP0177 is not set: install() DESTINATION paths are normalized.  Run
  "cmake --help-policy CMP0177" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

@cjee21 cjee21 force-pushed the CMake branch 6 times, most recently from a9f3ab0 to 91a493b Compare October 1, 2025 13:51
@cjee21 cjee21 force-pushed the CMake branch 11 times, most recently from cf634d2 to ac5cfdf Compare October 2, 2025 06:13
@cjee21
Copy link
Contributor Author

cjee21 commented Oct 2, 2025

Fixed CMake on Windows was building debug version and too slow.

Now there is only one deprecation warning left from ZenLib that should be gone after MediaArea/ZenLib#185

@JeromeMartinez
Copy link
Member

Now there is only one deprecation warning left from ZenLib that should be gone after MediaArea/ZenLib#185

I am not keen on the max value but fair enough for the moment, until someone does fix the warnings.

Thanks.

@JeromeMartinez
Copy link
Member

not a big deal, but is it expected to have "Unix (windows-latest, cmake" check name, "Unix" for a Windows build using Windows host if I understand well.

@cjee21
Copy link
Contributor Author

cjee21 commented Oct 2, 2025

not a big deal, but is it expected to have "Unix (windows-latest, cmake" check name, "Unix" for a Windows build using Windows host if I understand well.

Because since there is already existing CMake workflow, I just add the Windows one there and it uses Unix as job name. Maybe I should override the name for Windows.

@JeromeMartinez
Copy link
Member

Maybe I should override the name for Windows.

Would be nice to have.

@JeromeMartinez
Copy link
Member

(for macOS too, I guess :) )

@cjee21
Copy link
Contributor Author

cjee21 commented Oct 2, 2025

What about like this? I renamed the jobs to Build and MSBuild. Also added a define to prevent unused zlib tests/examples from being built.

@cjee21
Copy link
Contributor Author

cjee21 commented Oct 2, 2025

No more warnings remain. I think using 3.31 as max should be alright. zlib uses this version as max too.

@JeromeMartinez
Copy link
Member

What about like this? I renamed the jobs to Build and MSBuild.

Fair enough for the moment.

I think using 3.31 as max should be alright.

I like to have fixes instead of limiting the version but CMake is definitely need my priority, especially because we don't use it ourselves, so I let other people manage that.
(with the constraint that I want to keep compatibility with very old CMake version, so it does not help to "fix" the warnings :) )

@cjee21
Copy link
Contributor Author

cjee21 commented Oct 2, 2025

I like to have fixes instead of limiting the version

If I understand correctly it is not limiting but stating that it has been tested up to 3.31 so there won't be deprecation warnings and so on.

@JeromeMartinez
Copy link
Member

If I understand correctly it is not limiting but stating that it has been tested up to 3.31 so there won't be deprecation warnings and so on.

Right. Just that I would like to have a CMake script without warning for all CMake versions, but I guess it is not possible, or at least not easily. And CMake 3.5 "format" is still supporte by CMake 4+ so fine enough. Just a nice to have and definitely not the priority :).
(I try to manage your other PRs, which are a lot more important than CMake, by the end of the month)

@cjee21
Copy link
Contributor Author

cjee21 commented Oct 2, 2025

would like to have a CMake script without warning for all CMake versions

Are there still warnings for certain versions? I think there should be no more now?

@JeromeMartinez
Copy link
Member

Are there still warnings for certain versions? I think there should be no more now?

I mena, when removing the "max" version. Here it is a workaround, not a full compatibility.
But again, not a priority, I just do a remark that the "max" version is a workaround (and this is OK) and not a "final" fix.

@cjee21
Copy link
Contributor Author

cjee21 commented Oct 2, 2025

especially because we don't use it ourselves

Actually the CMake is used for the Android build and I have tested that the Android app still builds and runs with the changes in all of the CMake PRs.

@JeromeMartinez JeromeMartinez merged commit f5c9e06 into MediaArea:master Oct 2, 2025
13 checks passed
@cjee21 cjee21 deleted the CMake branch October 2, 2025 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants